From 280854080d03a1c0dfefc069a881e9cbb068578a Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Thu, 22 Sep 2011 18:32:34 +0100 Subject: [PATCH] VT-d: fix off-by-one error in RMRR validation (base_addr,end_addr) is an inclusive range, and hence there shouldn't be a subtraction of 1 in the second invocation of page_is_ram_type(). For RMRRs covering a single page that actually resulted in the immediately preceding page to get checked (which could have resulted in a false warning). Signed-off-by: Jan Beulich --- xen/drivers/passthrough/vtd/dmar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/drivers/passthrough/vtd/dmar.c b/xen/drivers/passthrough/vtd/dmar.c index 5580170275..81a50f221e 100644 --- a/xen/drivers/passthrough/vtd/dmar.c +++ b/xen/drivers/passthrough/vtd/dmar.c @@ -520,7 +520,7 @@ acpi_parse_one_rmrr(struct acpi_dmar_entry_header *header) * inform the user */ if ( (!page_is_ram_type(paddr_to_pfn(base_addr), RAM_TYPE_RESERVED)) || - (!page_is_ram_type(paddr_to_pfn(end_addr) - 1, RAM_TYPE_RESERVED)) ) + (!page_is_ram_type(paddr_to_pfn(end_addr), RAM_TYPE_RESERVED)) ) { dprintk(XENLOG_WARNING VTDPREFIX, " RMRR address range not in reserved memory " -- 2.30.2